<html>
    <head>
        <script src=media-file.js></script>
        <script src="media-controls.js"></script>
        <script>
            if (window.testRunner)
                testRunner.waitUntilDone();

            var video;

            function start()
            {
                setSrcByTagName("video", "content/test.ogv");
                video = document.getElementsByTagName('video')[0];
                enableTestMode(video);
                video.load();
                video.play();
                video.addEventListener("canplaythrough", canPlayThrough);
            }

            function canPlayThrough()
            {
                // Ensure that the frame is always the same in pixel result.
                video.addEventListener("seeked", finish);
                video.pause();
                video.currentTime = 0;
            }

            function finish()
            {
                if (window.testRunner)
                    testRunner.notifyDone();
            }
        </script>
    </head>

    <body onload="start()">
        <p>The controls should not depend on preload value.</p>
        <video preload=none controls ></video>
    </body>
</html>
